using System;
using System.Windows.Documents;
using HtmlAgilityPack;
using System.Windows;
using System.Windows.Controls;

namespace BF.SL
{
    public class BlockQuoteToXaml : HtmlTypeBase
    {
        public override string TagName
        {
            get { return "blockquote"; }
        }

        public override void ApplyType(HtmlNode htmlNode, Block block)
        {
            InlineUIContainer ilContainer = new InlineUIContainer();
            TextBlock tbItem = new TextBlock();
            tbItem.Margin = new Thickness(25, 0, 0, 0);
            tbItem.TextWrapping = TextWrapping.Wrap;
            tbItem.FontStyle = FontStyles.Italic;
            tbItem.Text = htmlNode.InnerText;
            ilContainer.Child = tbItem;
            (block as Paragraph).Inlines.Add(ilContainer);
        }
    }
}
